package com.woc.cloud.api.constant;

public enum ErrorCode {
    ParamsError(104, "参数错误"),
    Error(600, "请求异常"),
    Fail(601, "请求失败"),
    Forbidden(403, "没有权限"),
    Success(200, "成功");

    private Integer code;
    private String desc = "";

    ErrorCode(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    ErrorCode(Integer code) {
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Override
    public String toString() {
        return "ApiErrorCode{" +
                "code=" + code +
                ", desc='" + desc + '\'' +
                '}';
    }
}
